import { connect } from 'react-redux'
import LoginForm from './LoginForm'
import { actionCreaters as registerActionCreaters } from './store'
import { actionCreaters as flashActionCreaters } from '../Flash/store'
import { bindActionCreators } from "redux"
const Login = props => {
    return (
        <LoginForm {...props} />
    )
}

const mapStateToProps = state => {
    return {
        loginData: state.login
    }
}
const mapDispatchToProps = dispatch => {
    return {
        loginFn: bindActionCreators(registerActionCreaters, dispatch),
        flashFn: bindActionCreators(flashActionCreaters, dispatch)
    }
}
export default connect(mapStateToProps, mapDispatchToProps)(Login)